import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const router = new Router({
	routes: [
		{
			path: '*',
			name: 'index',
			component: () => import('./view/index/index.vue'),
		},
		{
			path: '/reg',
			name: 'reg',
			component: () => import('./view/index/reg.vue'),
		},
		{
			path: '/category',
			name: 'category',
			component: () => import('./view/goods/category.vue'),
		},
		{
			path: '/goods',
			name: 'goods',
			component: () => import('./view/goods/index.vue'),
		},
		{
			path: '/detail/:id',
			name: 'detail',
			component: () => import('./view/goods/detail.vue'),
		},
		{
			path: '/cart',
			name: 'cart',
			component: () => import('./view/order/cart.vue'),
		},
		{
			path: '/my',
			name: 'my',
			component: () => import('./view/my/index.vue'),
		}
	]
})
export {
	router
}

